<%@include file="startUpIncludes.jsp" %>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>
            View Account
        </title>
    <script type="text/javascript" src="../js/modalwin.js">
    </script>
      <script type="text/javascript">
    function getAjaxCities() {
        //alert($('#country').val());
        var selectedCountry = $('#country').val();
 
        $.ajax({
        type: "POST",
        url: "/sales/s/leadFormCityCountry",
        data: "selectedCountry="+selectedCountry,
        success: function(response){
      var cities = response.split('***');
      var Ids = cities[0];
      var Names = cities[1];
      var cityIds = Ids.split("?");
      var cityNames = Names.split("?");
    //  alert(cityIds[0]);
      //alert(cityNames[0]);
      $('#city').html('');
      jQuery.each(cityIds , function(index, value){
    	     var option = "<option value='" + value + "'>" + cityNames[index] + "</option>";
    	      	$('#city').append(option);
    	});
        },
        error: function(e){
        //alert('Error: ' + e);
        }
        });
        }
    </script>
    </head>
    <body>
    <jsp:include page="header.jsp" >
		<jsp:param value="true" name="loggedIn"/>
	</jsp:include>
    <div class="modal-win-bg">
        <div class="modal-win-box">
            <div class="modal-win-hd">
                <span class="modal-win-title"></span>
                <span class="modal-win-close">x</span>
            </div>
            <div class="modal-win-content"></div>
            <a class="form-btn modal-win-ok">OK</a>
        </div>
    </div>
    <div class="wrap">
	<div class="fitBG">
        <div class="main">
            <%@include file="basicLeftMenu.jsp" %>
            <div class="content">
				<jsp:include page="tabs.jsp" >
					<jsp:param value="accounts" name="currentPage"/>
				</jsp:include>
                <div class="tab-content">
                <h3>View Account</h3>
                <form class="new-lead-form" action="/sales/s/editAccount" method="post">
                <input type="hidden" name="id" value="${account.id}"/>
                <div class="btns">
                <c:choose>
                	<c:when test="${chatter != null }">
                	<a href="/sales/s/home" class="form-btn">Back</a>
                	</c:when>
                	<c:otherwise>
                		<a href="/sales/s/accounts" class="form-btn">Back</a>
                	</c:otherwise>
                </c:choose>
                </div>
                <div class="form-row">
                    <h4>Required Information</h4>
                    <div class="info"><label>Account Owner: </label><span>${userDetails.fName} ${userDetails.lName}</span></div>
                    <div class="info">
                        <label>Account Name: </label>
                        <span>${account.accountName}</span>
                    </div>
                    <div class="info">
                    </div>
                </div>
                <div class="form-row">
                    <h4>Account Information</h4>
                    <div class="info">
                        <label>Company Name: </label>
                        <span>${account.companyName}</span>
                        <label>Phone: </label>
                        <span>${account.phone}</span>
                        <label>Mobile: </label>
                        <span>${account.mobile}</span>
                    </div>
                    <div class="info">
                        <label>Fax: </label>
                        <span>${account.fax}</span>
                         <label>Email: </label>
                        <span>${account.email}</span>
                    </div>
                </div>
                <div class="form-row">
                    <h4>Address Information</h4>
                    <div class="info">
                        <label>Street: </label>
                        <span>${account.street}</span>
                        <label>Country: </label>
                        <c:choose>
                       	<c:when test="${account.country.countryName=='--none--'}">
                       		<span>  </span>
                       	</c:when>
                       	<c:otherwise>
							<span>${account.country.countryName}</span>                       		
                       	</c:otherwise>	
                       	</c:choose>
                       	 <label>City: </label>
                      <span>${account.city.name}</span>
                        <label>Area: </label>
                        <span>${account.state}</span>
                    </div>
                    <div class="info">
                        <label>Zip/Postal Code: </label>
                        <span>${account.zipCode}</span>
                      <label>Website: </label>
                        <span>${account.webSite}</span>
                    </div>
                </div>
                <div class="form-row">
                    <h4>Additional Information</h4>
                    <div class="info">
                        <label>No. of Employees: </label>
                        <span>${account.empNum}</span>
                        <label>Annual Revenue: </label>
                        <span>${account.annualRevenue}</span>
                        <label>Description: </label>
                        <span>${account.description}</span>
                    </div>
                    <div class="info">
                        <label>Type: </label>
                        <c:choose>
                       	<c:when test="${account.type=='--none--'}">
                       		<span>  </span>
                       	</c:when>
                       	<c:otherwise>
							<span>${account.type}</span>                       		
                       	</c:otherwise>	
                       	</c:choose>
                        <label>Industry: </label>
                        <c:choose>
                       	<c:when test="${account.industry=='--none--'}">
                       		<span>  </span>
                       	</c:when>
                       	<c:otherwise>
							<span>${account.industry}</span>                       		
                       	</c:otherwise>	
                       	</c:choose>
                    </div>
                </div>
                <div class="btns">
        		<a href="/sales/s/accounts" class="form-btn">Back</a>
                </div>
                </form>
                </div>
            </div>
        </div>
        
	<%@include file="footer.jspf" %>
    </div>
    </div>

    </body>
</html>